import express from 'express';
import {updateGoods,loginHandler,registerHandlerfn,addShoppingCar,getShoppingCar,removeGoods} from '../../routerHandler/userHandlerfn/index.js';
const router=express.Router();
// 登录请求
router.post('/goods/login',loginHandler)
router.post('/user/getSelf',function (req,res) {
  res.send({
    status:0,
    user:req.user.phone
  })
})
// 添加购物车
router.post('/user/addshoppingCar',addShoppingCar)
// 获取购物车
router.get('/user/getShoppingCar',getShoppingCar)
// 删除购物车Goods
router.post('/user/removeGoods',removeGoods)
// 注册请求
router.post('/goods/register',registerHandlerfn)
// 修改购物车商品数量
router.post('/user/updateGoods',updateGoods)
export default router